package org.jc.auth.common.enums;

import lombok.Getter;

/**
 * 功能描述
 *
 * @author wanghongqian
 * @date 2024/06/20 18:09
 */
@Getter
public enum IsDeletedFlagEnum {
    DELETED(1,"已删除"),
    UN_DELETED(0,"未删除");

    private int code;

    private String desc;

    IsDeletedFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static IsDeletedFlagEnum getByCode(int codeVal){
        for(IsDeletedFlagEnum codeEnum:IsDeletedFlagEnum.values()){
            if(codeEnum.getCode() == codeVal){
                return codeEnum;
            }
        }
        return null;
    }
}
